//
//  ContuctUsViewController.m
//  DriftDog
//
//  Created by rimi on 15/9/13.
//  Copyright (c) 2015年 廖马林. All rights reserved.
//

#import "ContuctUsViewController.h"

static NSString *const introduceText = @"新浪微博：  http://weibo.com/liaomaer\n\n联系邮箱：  liaodalin19903@126.com";

@interface ContuctUsViewController ()

@property(nonatomic, strong) UILabel *introduceLabel;

- (void)initializeUserInterface;

@end

@implementation ContuctUsViewController

- (void)viewDidLoad {
    
    [super viewDidLoad];
    [self initializeUserInterface];
}

#pragma mark - init

- (void)initializeUserInterface {
    
    self.view.backgroundColor = [UIColor colorWithWhite:236 / 255.f alpha:1];
    
    /* 添加子类控件 */
    [self.view addSubview:self.introduceLabel];
    
    /* 添加父类控件 */
    [self addTitleLabelWithName:@"产品简介"];
    [self addBaseLeftButtonWithImage:[UIImage imageNamed:@"返回图标"]];
    [self.baseLeftButton addTarget:self action:@selector(respondsToBaseLeftButton:) forControlEvents:UIControlEventTouchUpInside];
    
    
}

#pragma mark - responds event

- (void)respondsToBaseLeftButton:(UIButton *)sender {
    
    [self.navigationController popViewControllerAnimated:YES];
}

#pragma mark - getter

- (UILabel *)introduceLabel {
    
    if (!_introduceLabel) {
        
        _introduceLabel = [[UILabel alloc] initWithFrame:DHFlexibleFrame(CGRectMake(0, 75, ORIGIN_WIDTH - 40, ORIGIN_HEIGHT - 600), NO)];
        _introduceLabel.center = CGPointMake(self.view.center.x, 150);
        _introduceLabel.backgroundColor = [UIColor colorWithWhite:236 / 255.f alpha:1];
        _introduceLabel.numberOfLines = 0;
        _introduceLabel.text = introduceText;
        _introduceLabel.textColor = [UIColor colorWithWhite:0.6 alpha:1];
        _introduceLabel.font = [UIFont systemFontOfSize:17 * DHFlexibleVerticalMutiplier()];
        _introduceLabel.textAlignment = NSTextAlignmentJustified;
        
    }
    return _introduceLabel;
}

@end